package app.v1.wdt.domain.pojo;

import app.common.ar.Ar;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.feizns.quickstart.ddl.annotation.Comment;
import com.gitee.feizns.quickstart.mybatis.plus.builder.annotation.Equal;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * 旺店通销售单
 * @author feizns
 * @since 2023/3/6
 */
@Entity
@Getter
@Setter
@ToString(callSuper = true)
@Accessors(chain = true)
@TableName(autoResultMap = true)
@NoArgsConstructor
@Comment("旺店通销售单")
public class WdtSalesOrder extends Ar<WdtSalesOrder> {

    /**
     * 订单编号
     */
    @Equal
    @Comment("订单编号")
    private String orderNo;

    /**
     * dto
     */
    @Comment("dto")
    @Column(columnDefinition = "TEXT")
    private String dto;

    /**
     * 消息
     */
    @Comment("消息")
    private String message;

    /**
     * 是否成功
     * @return boolean
     */
    public boolean isSuccessfully() {
        return "null".equals(message);
    }

}
